import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import set from '@dfeidao/atom-web/local/set';
import render from "@dfeidao/atom-web/render/render";
import p001 from './p001';

export default async function a003(fd: IFeidaoAiBrowserComponent) {
	// todo
	const t = get(fd, 'photos');
	const d = t;
	const len = t as [];

	set(fd, 'len', len.length);

	const n = fd.data.node.querySelector<HTMLImageElement>('[data-id="pic"]');

	const temp = Number(n.getAttribute('flag'));

	if (d) {
		render(fd, d[temp - 1], p001, 'p001', 'inner');
	}

}
